<?php
/*
Copyright 2011 Erick Martínez Sámano

This file is part of PHP Quick Calendar E.

This view was created by taken elements from the PHP Quick Calendar's small and rounded views
*/
defined( '_JEXEC' ) or die( 'Restricted access' );
JHtml::_('behavior.framework');
$doc=& JFactory::getDocument(); $doc->addStyleSheet($this->baseurl.DS.'components'.DS.'com_pqce'.DS.'css'.DS.'small.css');$doc->addScript($this->baseurl.DS.'components'.DS.'com_pqce'.DS.'js'.DS.'small.js');
?>
<?php echo (!$this->raw)? '<div id="isQCEsmall"><div id="QCEsmall"><div id="QCEsmalltrgt">':'';?>
<table class="small" cellspacing="0" border="0" cellpadding="0">
<thead>
<tr>
<th class="t-l">&nbsp;<a class="Apqcejx" href="<?php echo $this->href['prevYear']; ?>" title="<?php echo JText::_('COM_PQCE_PREVY'); ?>">&laquo;</a></th>
<th>&nbsp;<a class="Apqcejx" href="<?php echo $this->href['prevMonth']; ?>"  title="<?php echo JText::_('COM_PQCE_PREVM'); ?>">&lt;</a></th>
<th colspan='3' style="font-size:11pt"><?php echo $this->href['header']; ?></th>
<th><a  href="<?php echo $this->href['nextMonth']; ?>" class="headerNav Apqcejx" title="<?php echo JText::_('COM_PQCE_NEXTM'); ?>">&gt;</a>&nbsp;</th>
<th class="t-r">&nbsp;<a href="<?php echo $this->href['nextYear']; ?>" class="headerNav Apqcejx" title="<?php echo JText::_('COM_PQCE_NEXTY'); ?>">&raquo;</a></th>
</tr>
</thead>
<tbody>
<tr><th><?php echo JText::_('COM_PQCE_1D01'); ?></th><th><?php echo JText::_('COM_PQCE_1D02'); ?></th><th><?php echo JText::_('COM_PQCE_1D03'); ?></th><th><?php echo JText::_('COM_PQCE_1D04'); ?></th><th><?php echo JText::_('COM_PQCE_1D05'); ?></th><th><?php echo JText::_('COM_PQCE_1D06'); ?></th><th><?php echo JText::_('COM_PQCE_1D07'); ?></th></tr>
<?php
for($i=0; $i<$this->weeksInMonth; $i++) {
	echo '<tr>';
	for ($j=0; $j < 7; $j++) {
		$dia=$this->cell[$i][$j]['value'];
		$dia=($dia)? '<span class="QCEsmall">'.$dia.'</span>': '';
		$mark=&$this->cell[$i][$j]['day'];
		if ($mark && !($this->cell[$i][$j]['isToday'])) {
			$class = 'withLink';
		}
		elseif ($this->cell[$i][$j]['isToday']) {
			$class = 'today';
		}
		else {
			$class = 'withoutLink';
		}
		if ($i==($this->weeksInMonth-1)){
			if ($j==0){		
			$class.=" b-l";
			}elseif ($j==6){
			$class.=" b-r";
			}
		}
		$str="<td class='$class'>";
		if ($mark!==null){
		 $str.=$mark;
		}else{
		 $str.=$dia;
		}
		echo $str.'</td>';
	}
	echo '</tr>';
}
?>
</tbody>
</table>
<?php echo (!$this->raw)? '</div></div><div id="smallQCEtrgt"><div id="smallQCEnavBar"><div id="smallQCEc" title="'.JText::_('COM_PQCE_CLS').'"></div><div id="smallQCEarrows"><div id="smallQCEs" title="'.JText::_('COM_PQCE_NEXTE').'"></div><div id="smallQCEa" title="'.JText::_('COM_PQCE_PREVE').'"></div></div></div><div id="smallSmooth">':'';
if ($this->type) {echo $this->loadTemplate($this->type);}
echo (!$this->raw)? '</div></div></div>':'';?>
